import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
    path: "/",
    redirect: "/home",
  },

  {
    path: '/shorliat',
    name: 'shorliat',
    component: () => import('../views/shorliat.vue')
  },
  {
    path: '/xiang',
    name: 'xiang',
    component: () => import('../views/xiang.vue')
  },
  {
    path: '/Index',
    name: 'Index',
    component: () => import('../views/Index.vue'),
    children: [{
        path: '/home',
        name: 'Home',
        component: () => import('../views/Home.vue')
      },
      {
        path: '/list',
        name: 'List',
        component: () => import('../views/List.vue')
      },
      {
        path: '/shopcar',
        name: 'Shopcar',
        component: () => import('../views/Shopcar.vue')
      },
      {
        path: '/my',
        name: 'My',
        component: () => import('../views/My.vue')
      },
    ]
  }, {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },{
    path: '/zhuan',
    name: 'zhuan',
    component: () => import('../views/zhuan.vue')
  },{
    path: '/qian',
    name: 'qian',
    component: () => import('../views/qian.vue')
  },{
    path: '/liquan',
    name: 'liquan',
    component: () => import('../views/liquan.vue')
  },{
    path: '/ren',
    name: 'ren',
    component: () => import('../views/ren.vue')
  },{
    path: '/renxiang',
    name: 'renxiang',
    component: () => import('../views/renxiang.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});

export default router;